device drivers, such as NVIDIA's, detect an inconsistency and do not
function when this option is enabled. Therefore the default is false (0).
+=item B<seize=BOOLEAN>
+
+Tells xl to automatically attempt to re-assign a device to
+pciback if it is not already assigned.
+
+WARNING: If you set this option, xl will gladly re-assign a critical
+system device, such as a network or a disk controller being used by
+dom0 without confirmation. Please use with care.
+
=item B<power_mgmt=BOOLEAN>
(HVM only) Specifies that the VM should be able to program the
Changes the default value of 'msitranslate' for all PCI devices passed
through to this VM. See L<msitranslate|/"msitranslate_boolean"> above.
+=item B<pci_seize=BOOLEAN>
+
+Changes the default value of 'seize' for all PCI devices passed
+through to this VM. See L<seize|/"seize_boolean"> above.
+
=item B<pci_power_mgmt=BOOLEAN>
(HVM only) Changes the default value of 'power_mgmt' for all PCI
rc = libxl__device_pci_setdefault(gc, pcidev);
if (rc) goto out;
+ if (pcidev->seize && !pciback_dev_is_assigned(gc, pcidev)) {
+ rc = libxl__device_pci_assignable_add(gc, pcidev, 1);
+ if ( rc )
+ goto out;
+ }
+
if (!libxl_pcidev_assignable(ctx, pcidev)) {
LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "PCI device %x:%x:%x.%x is not assignable",
pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func);
("msitranslate", bool),
("power_mgmt", bool),
("permissive", bool),
+ ("seize", bool),
])
libxl_device_vtpm = Struct("device_vtpm", [
pcidev->power_mgmt = atoi(tok);
}else if ( !strcmp(optkey, "permissive") ) {
pcidev->permissive = atoi(tok);
+ }else if ( !strcmp(optkey, "seize") ) {
+ pcidev->seize = atoi(tok);
}else{
XLU__PCI_ERR(cfg, "Unknown PCI BDF option: %s", optkey);
}
int pci_power_mgmt = 0;
int pci_msitranslate = 0;
int pci_permissive = 0;
+ int pci_seize = 0;
int i, e;
libxl_domain_create_info *c_info = &d_config->c_info;
if (!xlu_cfg_get_long (config, "pci_permissive", &l, 0))
pci_permissive = l;
+ if (!xlu_cfg_get_long (config, "pci_seize", &l, 0))
+ pci_seize = l;
+
/* To be reworked (automatically enabled) once the auto ballooning
* after guest starts is done (with PCI devices passed in). */
if (c_info->type == LIBXL_DOMAIN_TYPE_PV) {
pcidev->msitranslate = pci_msitranslate;
pcidev->power_mgmt = pci_power_mgmt;
pcidev->permissive = pci_permissive;
+ pcidev->seize = pci_seize;
if (!xlu_pci_parse_bdf(config, pcidev, buf))
d_config->num_pcidevs++;
}